home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Documents / QuickDraw GX Docs (Inside Mac) / Environment and Utilities / Environment and Utilities.rsrc / TOC#_1000 < prev   
Encoding:
Text File  |  1993-08-27  |  20.6 KB  |  8 lines

  1. Ü(QuickDraw GX 
  2. Environment and Utilities
  3. ContentsFigures, Tables, and ListingsAbout This BookThe QuickDraw GX Environment"About the QuickDraw GX EnvironmentThe Graphics ClientThe QuickDraw GX Object HeapThe Macintosh Toolbox Interface$QuickDraw to QuickDraw GX Translator"Using the QuickDraw GX Environment!Determining QuickDraw GX Versions4Listing 1-1    Determining the QuickDraw GX environment3Creating Graphics Clients and Graphics Object HeapsSFigure 1-1    Using functions to create graphics clients and QuickDraw GX object heaps*Using Default Memory Sizing and AllocationJFigure 1-2    Creating default graphics clients and QuickDraw GX object heaps%Specifying Memory Size and Allocation1Listing 1-2    Specifying memory size and allocation9Determining the Memory Requirements for a Graphics Client$Specifying Multiple Graphics Clients'Using the Macintosh Interface FunctionsCreating and Using View PortsUsing Graphics Devices<Converting from QuickDraw Global to QuickDraw GX CoordinatesXFigure 1-3    Converting from QuickDraw global to QuickDraw GX local and global coordinates@Determining Mouse Coordinates in QuickDraw GX Global Coordinates;Determining the Mouse Coordinates for a Specified View PortIntercepting View Port Calls*Translating from QuickDraw to QuickDraw GXScaling the Translation%Table 1-1    Translation scaling factorsUsing Translation Options0Table 1-2    Translation option settings(continued)Using Translation Statistics3Table 1-3    Translation statistics options(continued)0Translating with an Application-defined FunctionTranslating with picComments'Listing 1-3    Sample Code of a picComment+Figure 1-4    Output of picComment Sample CodeTranslating Fill PatternsJFigure 1-5    Translator conversion of some QuickDraw fill patterns to blends$Translating Lines Using Option Flags0Listing 1-4    QuickDraw Commands for a Simple Line"Figure 1-6    Original QuickDraw line`Figure 1-7    Translation of the original QuickDraw line using the gxDefaultOptionsTranslation flag`Figure 1-8    Translation of the original QuickDraw line using the gxSimpleGeometryTranslation flagbFigure 1-9    Translation of the original QuickDraw line using the gxReplaceLineWidthTranslation flag>Using GXInstallQDTranslator and GXRemoveQDTranslator FunctionsJListing 1-5    Sample code for GXInstallQDTranslator and GXRemoveQDTranslator_Figure 1-10    Translation of QuickDraw lines using GXInstallQDTranslator and GXRemoveQDTranslator'Using the GXConvertPICTToShape Function?Listing 1-6    Sample code using the function GXConvertPICTToShape"QuickDraw GX Environment ReferenceConstants and Data Types    FunctionsThe Graphics ClientGXNewGraphicsClientGXDisposeGraphicsClientGXEnterGraphicsGXExitGraphicsGXGetGraphicsClientGXGetGraphicsClientsGXSetGraphicsClientMacintosh Interface FunctionsGXConvertQDPointGXGetGlobalMouseGXGetViewPortMouseGXNewWindowViewPortGXGetViewPortWindowGXGetWindowViewPortGXGetViewDeviceGDeviceGXGetGDeviceViewDeviceGXSetViewPortFilterGXGetViewPortFilter$QuickDraw to QuickDraw GX TranslatorGXInstallQDTranslatorGXRemoveQDTranslatorGXConvertPICTToShape'Summary of the QuickDraw GX EnvironmentQuickDraw GX Memory ManagementAbout QuickDraw GX MemoryUsing QuickDraw GX MemorySizing and Allocating MemoryLoading and Unloading Objects.Manipulating Structures in QuickDraw GX Memory(QuickDraw GX Memory Management Reference    FunctionsLoading and Unloading Objects GXLoadShape
  4. GXUnloadShape GXLoadStyle
  5. GXUnloadStyle    GXLoadInk GXUnloadInkGXLoadTransformGXUnloadTransformGXLoadColorSetGXUnloadColorSetGXLoadColorProfileGXUnloadColorProfile    GXLoadTag GXUnloadTagErrors, Warnings, and Notices0About QuickDraw GX Errors, Warnings, and Notices9Table 3-1    QuickDraw GX execution problem types(continued)dFigure 3-1    Complementary QuickDraw GX and application-supplied error, warning, and notice managementFTable 3-2    QuickDraw GX debugging and non-debugging versions(continued)GFigure 3-2    The relationship of the debugging and non-debugging versionsNon-debugging VersionDebugging VersionQuickDraw GX Errors)Table 3-3    Error number summary(continued)!Table 3-4    Fatal errors(continued)$Table 3-5    Internal errors(continued)'Table 3-6    Font scaler errors(continued)(Table 3-7    Font manager errors(continued)'Table 3-8    Recoverable errors(continued)*Table 3-9    Bad parameters errors(continued)8Table 3-10    Wrong type or bad reference errors(continued),Table 3-11    Type Validation errors(continued)1Table 3-12    Structure validation errors(continued)2Table 3-13    All object validation errors(continued)2Table 3-14    Implementation limits errors(continued)QuickDraw GX Warnings,Table 3-15    Warning number summary(continued);Table 3-16    Stack underflow and overflow warnings(continued)ATable 3-17    Cannot perform requested operation warnings(continued)2Table 3-18    Result out of range warnings(continued)5Table 3-19    Parameter out of range warnings(continued)0Table 3-20    Restricted access warnings(continued)+Table 3-21    Invalid data warnings(continued)7Table 3-22    Cannot perform operation warnings(continued)ITable 3-23    Shape does not have assumed characteristic warnings(continued)0Table 3-24    Unexpected result warnings(continued)&Table 3-25    Storage warnings(continued)*Table 3-26    Font scaler warnings(continued)$Table 3-27    Other warnings(continued)QuickDraw GX Notices+Table 3-28    Notice number summary(continued)Table 3-29    Notices(continued)#Using Errors, Warnings, and Notices0Obtaining QuickDraw Errors, Warnings, or NoticesAFigure 3-3    Obtaining the first and last posted QuickDraw GX error9Listing 3-1    Obtaining the first QuickDraw GX posted error>Listing 3-2    Obtaining the first and last QuickDraw GX warning DListing 3-3    Obtaining the first and last QuickDraw GX posted notices:Changing the QuickDraw GX Error, Warning, or Notice Posted2Listing 3-4    Changing the QuickDraw GX error posted*Ignoring QuickDraw GX Warnings and NoticesdFigure 3-4    Adding and removing warnings and notices from the ignore warning and ignore notice stacks/Installing an Error, Warning, or Notice Handler2Figure 3-5    Enabling and disabling an error handler5Listing 3-5    An application-supplied error handler (I)>Listing 3-6    Using multiple application-supplied error handlers4QuickDraw GX Errors, Warnings, and Notices Reference
  6. Data TypesQuickDraw GX Errors'Application-Supplied Handler for ErrorsQuickDraw GX Warnings)Application-Supplied Handler for WarningsQuickDraw GX Notices(Application-Supplied Handler for Notices    FunctionsError Posting and HandlingGXGetGraphicsErrorGXPostGraphicsErrorGXGetUserGraphicsErrorGXSetUserGraphicsErrorWarning Posting and HandlingGXGetGraphicsWarningGXPostGraphicsWarningGXGetUserGraphicsWarningGXSetUserGraphicsWarningGXIgnoreGraphicsWarningGXPopGraphicsWarningNotice Posting and HandlingGXGetGraphicsNoticeGXPostGraphicsNoticeGXGetUserGraphicsNoticeGXSetUserGraphicsNoticeGXIgnoreGraphicsNoticeGXPopGraphicsNoticeApplication-Supplied FunctionsMyUserGraphicsErrorMyUserGraphicsWarningMyUserGraphicsNotice(Summary of Errors, Warnings, and NoticesQuickDraw GX Debugging,About the QuickDraw GX Debugging Environment1Figure 4-1    The QuickDraw GX debugging environmentQuickDraw GX Debugging Version*QuickDraw GX Errors, Warnings, and Notices8Application-Supplied Error, Warning, and Notice HandlersThe Drawing Error FunctionValidation FunctionsMacsBug and GraphicsBug,Using the QuickDraw GX Debugging EnvironmentAnalyzing Drawing Problems/Table 4-1    QuickDraw GX drawing process sequence.Table 4-2    Shape type drawing errors(continued))Table 4-3    Style drawing errors(continued)'Table 4-4    Ink drawing errors(continued)-Table 4-5    Transform drawing errors(continued)-Table 4-6    View port drawing errors(continued)/Table 4-7    View device drawing errors(continued)Using Validation Functions1Validating Types, Structures, and Internal CachesETable 4-8    Public and internal validation mode option flags(continued)MTable 4-9    Type, structure, and all object validation level options(continued)/Table 4-10    Memory validation options(continued)+Validating Specific Objects and All Objects(Analyzing the Cause of Validation ErrorsXListing 4-1    Determining the function and parameter that caused the last validation error8Distinguishing between Application and QuickDraw GX BugsDetecting Corrupted ObjectsInstalling a Debugging FunctionDebugging with GraphicsBug8Table 4-11    GraphicsBug commands and responses(continued) QuickDraw GX Debugging ReferenceConstants and Data TypesDrawing ErrorsValidation LevelGraphicsBug Parameters    FunctionsDrawing ErrorsGXGetShapeDrawError
  7. ValidationGXSetValidationGXGetValidationGXGetValidationError"Specific and All Object ValidationGXValidateShapeGXValidateStyle
  8. GXValidateInkGXValidateTransformGXValidateColorSetGXValidateColorProfile
  9. GXValidateTagGXValidateViewDeviceGXValidateViewPortGXValidateViewGroupGXValidateGraphicsClient
  10. GXValidateAllDebugging Utility FunctionsGXGetUserGraphicsDebugGXSetUserGraphicsDebug!GXGetGraphicsBugParametersPointer!Summary of QuickDraw GX DebuggingCollection ManagerAbout the Collection ManagerCollection Objects Figure 5-1    The collection objectCollection ItemsFigure 5-2    The collection itemCollection Attributes2Figure 5-3    Editing attributes in a collection item'Methods of Identifying Collection Items Figure 5-4    Items in a collectionUsing the Collection Manager"Creating or Disposing a CollectionCloning or Copying a Collection/Changing the Default Attributes of a Collection;Listing 5-1    Changing the default attributes of a collectionAdding Items to a Collection(Listing 5-2    Adding items to a collectionBListing 5-3    Adding items with variable-length data to a collection Determining the Index of an Item,Listing 5-4    Determining the index of an item%Determining the Tag and ID of an ItemHListing 5-5    Determining the tag and ID of an item given the item’s index6Determining the Size of an Item’s Variable-Length DataBListing 5-6    Determining the size of an item’s variable-length data-Getting and Setting the Attributes of an Item/Listing 5-7    Examining the attributes of an item;Listing 5-8    Setting the lock and persistent bits of an itemReplacing Items in a Collection-Listing 5-9    Replacing an item in a collection5Listing 5-10    Replacing an item using the item’s index Removing Items from a Collection-Listing 5-11    Removing an item in a collection4Listing 5-12    Removing an item using the item’s index=Listing 5-13    Removing multiple items with specific attributes0Retrieving the Variable-Length Data From an Item=Listing 5-14    Retrieving the variable-length data from an itemTListing 5-15    Retrieving the variable-length data from an item using the item’s index`Listing 5-16    Retrieving the variable-length data from an item using the item’s tag and tag index-Examining the Collection Tags of a Collection*Listing 5-17    Counting tags in a collection(Flattening and Unflattening a Collection!Listing 5-18    Flattening procedure2Listing 5-19    The FlattenCollectionFromHdl function4Listing 5-20    Unflattening a collection from a handle8Reading Collections From and Writing Collections to DiskAListing 5-21    Flattening a collection to a disk file as a resourceBListing 5-22    Flattening a collection to a data fork of a disk fileEListing 5-23    Unflattening a collection from a disk file as a resourceHListing 5-24    Unflattening a collection from the data fork of a disk fileCollection Manager Reference
  11. Data Types
  12. Collection ObjectsCollection TagsOptional Return Value ConstantsAttributes MasksAttribute Bit NumbersAttribute Bit Masks    Functions,Creating and Disposing of Collection ObjectsNewCollection DisposeCollection &Cloning and Copying Collection ObjectsCloneCollection CountCollectionOwners CopyCollection ;Getting and Setting the Default Attributes for a CollectionGetCollectionDefaultAttributes SetCollectionDefaultAttributes *Adding and Replacing Items in a CollectionAddCollectionItem ReplaceIndexedCollectionItem  Removing Items From a CollectionRemoveCollectionItem RemoveIndexedCollectionItem PurgeCollection PurgeCollectionTag EmptyCollection Counting Items in a CollectionCountCollectionItems CountTaggedCollectionItems 0Retrieving the Variable-Length Data From an ItemGetCollectionItem GetIndexedCollectionItem GetTaggedCollectionItem +Getting Information About a Collection ItemGetCollectionItemInfo GetIndexedCollectionItemInfo GetTaggedCollectionItemInfo Editing Item AttributesSetCollectionItemInfo SetIndexedCollectionItemInfo )Getting Information About Collection TagsCollectionTagExists CountCollectionTags GetIndexedCollectionTag -Working With Macintosh Memory Manager HandlesAddCollectionItemHdl ReplaceCollectionItemHdl GetCollectionItemHdl 'Reading Collections From Resource FilesGetNewCollection (Flattening and Unflattening a CollectionFlattenCollection FlattenPartialCollection UnflattenCollection FlattenCollectionToHdl UnflattenCollectionFromHdl Application-Defined FunctionsMyFlattenProc     ResourcesThe Collection Resource1Listing 5-25    A Rez template for a 'cltn' resource!Summary of the Collection ManagerMessage ManagerIntroduction to Messages"Message Manager Terms and Concepts'Benefits of Message-Based Architectures InheritanceUsing the Message Manager Listing 6-1     Listing 6-2     Listing 6-3     Listing 6-4    Custom DispatchingCleanup FunctionSummary of Message DispatchingMessage Manager ReferenceData Structures    Functions"Message Class Management FunctionsNewMessageClassDisposeMessageClassCloneMessageClassNewDerivedMessageClassSetMessageClassDispatchProcSetMessageClassCleanupProc*GetMessageClassRefConSetMessageClassRefConAddMessageHandlerInsertMessageHandlerRemoveMessageHandlerDeleteMessageHandlerAtInstallMessageHandlerOverrideRemoveMessageHandlerOverrideCountMessageHandlers*GetMessageHandlerDataSetMessageHandlerData#Message Object Management FunctionsNewMessageObjectDisposeMessageObjectCloneMessageObject*GetMessageObjectRefConSetMessageObjectRefConGetMessageObjectClassCountMessageObjectsForAllMessageObjectsDo#Message Handler Interface FunctionsGetMessageHandlerStoreMessageContext*RetrieveMessageContextNewMessageGlobalsDisposeMessageGlobals-Functions For Sending and Forwarding MessagesGetMessageTargetSetMessageTarget SendMessageForwardThisMessageForwardMessage
  13. SendMessageToSendObjectMessageSendObjectMessageToSendObjectMessageAtStartMessageAtSummary of the Message ManagerQuickDraw GX Stream FormatAbout QuickDraw GX Data Streams
  14. Attributes
  15. Extensible
  16. Byte OrientedMinimized DataData CompressionShape Oriented3Figure 7-1    Basic components of a QuickDraw GX shape3Figure 7-2    The flattened shape data stream sequence%QuickDraw GX Stream Component Formats3Figure 7-3    The building blocks of the stream formatStream Data Types&Table 7-1    Stream data types(continued)Operation Opcode Byte2Figure 7-4    The format of the operation opcode byteTable 7-2    Operation opcodesData Type Opcode Byte2Figure 7-5    The format of the data type opcode byte*Table 7-3    Compression constants(continued)&Table 7-4    Data type opcodes(continued)$Omit Byte Masks and Omit Byte ShiftsPTable 7-5    Constants from the gxOmitTextMask and the gxOmitTextShift enumerations-Figure 7-6    Select the bits from the omit byteQFigure 7-7    Compare the bits selected and shifted with the compression enumerationGTable 7-6    Correlation between gxOmitTaxtMask and the GXNewText functionBit Image Compression Byte'Table 7-7    Bit image compression opcodes Header and Object Stream FormatsHeader*Figure 7-8    The stream format of the header Style Object0Figure 7-9    The stream format of the style object2Table 7-8    Style data opcode correlation(continued)*Table 7-9    Style omit byte data correlation
  17. Ink Object/Figure 7-10    The stream format of the ink object1Table 7-10    Ink data opcode correlation(continued))Table 7-11    Ink omit byte data correlationTransform Object5Figure 7-11    The stream format of the transform object1Table 7-12    Transformation bytes format(continued)7Table 7-13    Transform data opcode correlation(continued)
  18. Shape Object 1Figure 7-12    The stream format of the shape object2Table 7-14    Shape types data correlation(continued)6Table 7-15    Shape omit byte data correlation(continued)Termination Object7Figure 7-13    The stream format of the termination object0About Print Files and Portable Digital DocumentsFigure 7-14    Print file formatPortable Digital DocumentUsing QuickDraw GX Data Streams"Flattening shapes with GraphicsBugLListing 7-1    A GraphicsBug annotation of the data stream of a flattened shape.Analyzing the Data Streams of Flattened Shapes$Creating a Picture with Seven Shapes'Listing 7-2    A picture with seven shapes'Figure 7-15    A picture with seven shapes Analyzing a Flattened Line Shape Figure 7-16    The line shape drawn4Listing 7-3    GraphicsBug analysis of a flattened lineKTable 7-16    Analysis of the data stream of a flattened line shape(continued)%Analyzing a Flattened Rectangle Shape%Figure 7-17    The rectangle shape drawn?Listing 7-4    GraphicsBug analysis of a flattened rectangle shapePTable 7-17    Analysis of the data stream of a flattened rectangle shape(continued)!Analyzing a Flattened Curve Shape!Figure 7-18    The curve shape drawn;Listing 7-5    GraphicsBug analysis of a flattened curve shapeLTable 7-18    Analysis of the data stream of a flattened curve shape(continued) Analyzing a Flattened Path Shape Figure 7-19    The path shape drawn:Listing 7-6    GraphicsBug analysis of a flattened path shapeKTable 7-19    Analysis of the data stream of a flattened path shape(continued) Analyzing a Flattened Text Shape Figure 7-20    The text shape drawn:Listing 7-7    GraphicsBug analysis of a flattened text shapeKTable 7-20    Analysis of the data stream of a flattened text shape(continued)#Analyzing a Flattened Polygon Shape#Figure 7-21    The polygon shape drawn=Listing 7-8    GraphicsBug analysis of a flattened polygon shapeNTable 7-21    Analysis of the data stream of a flattened polygon shape(continued)"Analyzing a Flattened Bitmap Shape"Figure 7-22    The bitmap shape drawn<Listing 7-9    GraphicsBug analysis of a flattened bitmap shapeMTable 7-22    Analysis of the data stream of a flattened bitmap shape(continued)*Masking and Shifting the Data Stream Bytes9Listing 7-10    Determining if position x is byte compressed Obtaining Data from a Print FileQListing 7-11    Obtaining the page count from a Portable Digital Document print file#QuickDraw GX Data Streams ReferenceOpcode Constants and Data TypesOperation OpcodesData Type OpcodesShape Data OpcodesStyle Data OpcodesColor Set Data OpcodesProfile Data OpcodesTransform Data OpcodesGeneric Data OpcodeInk Data OpcodesBit Image Compression OpcodesTwo Bit Compression ValuesFlatten Header Bytes/Style Object Omit Byte Constants and Data Types%Dash Style Omit Byte Masks and Shifts(Pattern Style Omit Byte Masks and Shifts%Join Style Omit Byte Masks and Shifts$Cap Style Omit Byte Masks and Shifts*Text Face Style Omit Byte Masks and Shifts%Face Layer Omit Byte Masks and Shifts-Ink Object Omit Byte Constants and Data Types!Colors Omit Byte Masks and Shifts#Transfer Omit Byte Masks and Shifts-Transfer Component Omit Byte Masks and Shifts/Shape Object Omit Byte Constants and Data Types%Path Shape Omit Byte Masks and Shifts'Bitmap Shape Omit Byte Masks and Shifts$Bit Image Omit Byte Masks and Shifts%Text Shape Omit Byte Masks and Shifts&Glyph Shape Omit Byte Masks and Shifts'Layout Shape Omit Byte Masks and Shifts(Picture Shape Omit Byte Masks and Shifts!QuickDraw GX Data Streams SummaryQuickDraw GX MathematicsAbout QuickDraw GX Mathematics Number TypesFixed Point Numbers Long Numbers
  19. Fixed Numbers
  20. Fract Numbers
  21. Short NumbersColor Value Numbers Wide NumbersMacros    FunctionsMapping+Figure 8-1    Effects of the transform mappingUsing QuickDraw GX MathematicsInterconverting Number TypesMapping Translating  Figure 8-2    Translating an objectScaling Figure 8-3    Scaling an objectSkewing     Rotating Figure 8-4    Rotating an objectModifying Perspective Performing Arithmetic Operations%Determining the Magnitude of a Vector0Figure 8-5    Determining the magnitude of a vectorMathematical ReferenceMacrosNumber Type ConversionsGXFixedToFractGXFractToFixed GXFixedToInt GXIntToFixedffGXFixedToFloatGXFloatToFixedflGXFractToFloatGXFloatToFractGXColorToFractGXFractToColor0Rounding, Truncating, and Square Root Operations GXFixedRoundGXFixedTruncateGXFixedSquareRoot    FunctionsFixed Point OperationsGXFixedMultiply
  22. GXFixedDivideGXMultiplyDivide GXMagnitudeGXFractSineCosineGXFractSquareRootGXFractCubeRootGXFractMultiply
  23. GXFractDivideWide Mathematical Operations    GXWideAddGXWideSubtract GXWideNegate GXWideShiftGXWideMultiply GXWideDivideGXWideWideDivideGXWideSquareRoot GXWideScale
  24. GXWideCompareVector OperationsGXVectorMultiplyGXVectorMultiplyDivide0Cartesian and Polar Coordinate Point ConversionsGXPolarToPointGXPointToPolarMapping OperationsGXCopyToMappingGXInvertMapping GXMapMapping
  25. GXMoveMappingGXMoveMappingToGXNormalizeMappingGXRotateMappingGXScaleMappingGXResetMapping
  26. GXSkewMapping GXMapPointsRandom Number Generation GXRandomBitsGXSetRandomSeedGXGetRandomSeedMiscellaneous Operations GXLinearRootGXQuadraticRoot
  27. GXFirstBit#Summary of QuickDraw GX MathematicsGlossaryIndex